package tech.heptagram.staff.cas.config.cas.domain;


import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;
import java.util.HashSet;

import lombok.Data;

/**
 * spring security 的用户详情
 */
@Data
public class UserInfo implements UserDetails {

    private String username;

    private String password;

    private Integer id;

    private String code;

    private Integer cityId;

    private String trueName;

    private String namePinyin;

    private String nickName;

    private String email;

    private String mobile;

    private String mobile2;

    private Integer status;

    private String avatarUrl;

    private boolean accountNonExpired = true;

    private boolean accountNonLocked = true;

    private boolean credentialsNonExpired = true;

    private boolean enabled = true;

    private Collection<? extends GrantedAuthority> authorities = new HashSet<GrantedAuthority>();
}
